import { useState } from 'react'; import { Tabs, TabItem, Button } from '@aws-amplify/ui-react'; export const ControlledTabExample = () => { const [index, setIndex] = useState(0); return ( setIndex(i)}> Content of the first tab

The content of the second tab is initially shown because we passed in index 1 to defaultIndex (notice that the tabs are zero-indexed).

); };